<!DOCTYPE HTML>
<html>
  <head>
    <title>iOS Docs | TinyCrayon</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <link rel="apple-touch-icon" sizes="180x180" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/favicons/apple-touch-icon.png">
    <link rel="icon" type="image/png" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/favicons/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/favicons/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/favicons/manifest.json">
    <link rel="mask-icon" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/favicons/safari-pinned-tab.svg" color="#5bbad5">

    <meta name="theme-color" content="#ffffff"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    
    <link rel="stylesheet" type="text/css" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/css/index.css">
    <link rel="stylesheet" type="text/css" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/css/iconfont.css">
    
<link rel="stylesheet" type="text/css" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/css/highlight.css">
<link rel="stylesheet" type="text/css" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/css/jazzy.css">

  </head>

  <body >
    <div class="logo text-center"><a href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/">TinyCrayon</a></div>
    <header class="text-center">
      <nav class="navbar navbar-fixed-top">
        <ul class="nav">
          <li ><a id="link-index" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/">Home</a></li>
          <li ><a id="link-guides" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/guides-iOS/get-started.html">Guides</a></li>
          <li class="active"><a id="link-docs" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/index.html">Docs</a></li>
	  <li ><a id="link-faq" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/FAQ-iOS.html">FAQ</a></li>
        </ul>
      </nav>
    </header>
    
<div class="main-content">
  <div class="container">
    
<p class="breadcrumbs">
  <a class="breadcrumb" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/index.html">TinyCrayon Reference</a>
  <img class="carat" src="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/img/carat.png" />
  Classes Reference
</p>

<div class="content-wrapper">
  <nav class="navigation">
    <ul class="nav-groups">
      <li class="nav-group-name">
        <a class="nav-group-name-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Classes.html">Classes</a>
        <ul class="nav-group-tasks">
          <li class="nav-group-task">
            <a class="nav-group-task-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Classes/TCMask.html">TCMask</a>
          </li>
          <li class="nav-group-task">
            <a class="nav-group-task-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Classes/TCMaskView.html">TCMaskView</a>
          </li>
          <li class="nav-group-task">
            <a class="nav-group-task-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Classes/TCMaskViewMode.html">TCMaskViewMode</a>
          </li>
          <li class="nav-group-task">
            <a class="nav-group-task-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Classes/TCUIView.html">TCUIView</a>
          </li>
        </ul>
      </li>
      <li class="nav-group-name">
        <a class="nav-group-name-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Enums.html">Enums</a>
        <ul class="nav-group-tasks">
          <li class="nav-group-task">
            <a class="nav-group-task-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Enums/TCMaskTool.html">TCMaskTool</a>
          </li>
        </ul>
      </li>
      <li class="nav-group-name">
        <a class="nav-group-name-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Protocols.html">Protocols</a>
        <ul class="nav-group-tasks">
          <li class="nav-group-task">
            <a class="nav-group-task-link" href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/docs-iOS/Protocols/TCMaskViewDelegate.html">TCMaskViewDelegate</a>
          </li>
        </ul>
      </li>
    </ul>
  </nav>
  <article class="main-content">
    

<section class="section">
  <div class="section-content">
    <h1>Classes</h1>
    <p>The following classes are available globally.</p>

  </div>
</section>

<section class="section">
  <div class="section-content">
    <div class="task-group">
      <ul class="item-container">
        <li class="item">
          <div>
            <code>
              <a name="/s:C6TCMask6TCMask"></a>
              <a name="//apple_ref/swift/Class/TCMask" class="dashAnchor"></a>
              <a class="token" href="#/s:C6TCMask6TCMask">TCMask</a>
            </code>
          </div>
          <div class="height-container">
            <div class="pointer-container"></div>
            <section class="section">
              <div class="pointer"></div>
              <div class="abstract">
                <p>TCMask is the masking result from TCMaskView</p>

                <a href="Classes/TCMask.html" class="slightly-smaller">See more</a>
              </div>
              <div class="declaration">
                <h4>Declaration</h4>
		<div class="language">
		  <p class="aside-title">Swift</p>
		  <pre class="highlight"><code><span class="kd">class</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
		<div class="language">
		  <p class="aside-title">Objective-C</p>
		  <pre class="highlight"><code><span class="kd">@interface</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
              </div>
            </section>
          </div>
        </li>
        <li class="item">
          <div>
            <code>
              <a name="/s:C6TCMask10TCMaskView"></a>
              <a name="//apple_ref/swift/Class/TCMaskView" class="dashAnchor"></a>
              <a class="token" href="#/s:C6TCMask10TCMaskView">TCMaskView</a>
            </code>
          </div>
          <div class="height-container">
            <div class="pointer-container"></div>
            <section class="section">
              <div class="pointer"></div>
              <div class="abstract">
                <p>The module that displays a UIViewController for image masking.
		  A minimum implementation to present a TCMaskview within a UIViewController class is:</p>

		<pre class="highlight plaintext"><code>// Create TCMaskView, specifying the image for masking.
let maskView = TCMaskView(image: self.image)

// Present TCMaskView from current view controller.
maskView.present(from: self, animated: true)</code></pre>

                <a href="Classes/TCMaskView.html" class="slightly-smaller">See more</a>
              </div>
              <div class="declaration">
                <h4>Declaration</h4>
		<div class="language">
		  <p class="aside-title">Swift</p>
		  <pre class="highlight"><code><span class="kd">class</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
		<div class="language">
		  <p class="aside-title">Objective-C</p>
		  <pre class="highlight"><code><span class="kd">@interface</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
              </div>
            </section>
          </div>
        </li>
        <li class="item">
          <div>
            <code>
              <a name="/s:C6TCMask14TCMaskViewMode"></a>
              <a name="//apple_ref/swift/Class/TCMaskViewMode" class="dashAnchor"></a>
              <a class="token" href="#/s:C6TCMask14TCMaskViewMode">TCMaskViewMode</a>
            </code>
          </div>
          <div class="height-container">
            <div class="pointer-container"></div>
            <section class="section">
              <div class="pointer"></div>
              <div class="abstract">
                <p>TCMaskViewMode defines how the current masking result is shown to the user, the result value (v) shown to user is blended with current mask (m) by foreground image/color (f) and background image/color (b):</p>

		<ul>
		  <li>If inverted is false: v = f * m + b * (1 - m)</li>
		  <li>If inverted is true: v = f * (1 - m) + b * m</li>
		</ul>

		<p>For both foreground and background settings:</p>

		<ul>
		  <li>If image is not nil, image will be used</li>
		  <li>If image is nil and color is not nil, color will be used</li>
		  <li>If both image and color are nil, foreground will be set to a PNG transparent color and background will be set to the image of masking</li>
		</ul>

                <a href="Classes/TCMaskViewMode.html" class="slightly-smaller">See more</a>
              </div>
              <div class="declaration">
                <h4>Declaration</h4>
				<div class="language">
		  <p class="aside-title">Swift</p>
		  <pre class="highlight"><code><span class="kd">class</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
		<div class="language">
		  <p class="aside-title">Objective-C</p>
		  <pre class="highlight"><code><span class="kd">@interface</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
              </div>
            </section>
          </div>
        </li>
        <li class="item">
          <div>
            <code>
              <a name="/s:C6TCMask8TCUIView"></a>
              <a name="//apple_ref/swift/Class/TCUIView" class="dashAnchor"></a>
              <a class="token" href="#/s:C6TCMask8TCUIView">TCUIView</a>
            </code>
          </div>
          <div class="height-container">
            <div class="pointer-container"></div>
            <section class="section">
              <div class="pointer"></div>
              <div class="abstract">
                <p>The TCUIView defines a UI component in TCMaskView.
		  You can change the property in TCUIView to customize the UI style of TCMaskView</p>

                <a href="Classes/TCUIView.html" class="slightly-smaller">See more</a>
              </div>
              <div class="declaration">
                <h4>Declaration</h4>
		<div class="language">
		  <p class="aside-title">Swift</p>
		  <pre class="highlight"><code><span class="kd">class</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
		<div class="language">
		  <p class="aside-title">Objective-C</p>
		  <pre class="highlight"><code><span class="kd">@interface</span> <span class="kt">TCMask</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
		</div>
              </div>
            </section>
          </div>
        </li>
      </ul>
    </div>
  </div>
</section>

  </article>
</div>

  </div>
</div>

    <footer class="footer">
      <div class="container">
	<div class="footer-links clearfix">
	  <div class="link col-sm-4">
            <a href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/contact-support.html">Contact Support</a>
	  </div>
	  <div class="link col-sm-4">
            <a href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/privacy-policy.html">Privacy Policy</a>
	  </div>
	  <div class="link col-sm-4">
            <a href="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/terms-of-use.html">Terms of Use</a>
          </div>
	</div>
	<p class="copyright">Copyright © 2017 TinyCrayon. All rights reserved</p>
      </div>
    </footer>

    <!-- Bootstrap core JavaScript -->
    <!-- Placed at the end of the document so the pages load faster -->
    
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    
    <script src="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/js/index.js"></script>
    
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-39532290-1', 'auto');
      ga('send', 'pageview');
    </script>
    
    
<script src="https://tinycrayon.github.io/TinyCrayon-iOS-SDK/js/jazzy.js"></script>

  </body>
</html>